package cn.iocoder.yudao.module.trade.aftersale.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.AssertTrue;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

@Schema(description = "管理后台 - 售后订单拒绝收货 Request VO")
@Data
public class AfterSaleRefuseReqVO {

    @Schema(description = "售后编号", example = "1024")
    private Long id;

    @Schema(description = "订单编号", example = "1024")
    private Long orderId;

    @SuppressWarnings("unused")
    @AssertTrue(message = "售后编号和订单编号不能同时为空")
    public boolean validateAfterSaleIdAndOrderId() {
        return (id != null && id > 0) || (orderId != null && orderId > 0);
    }

    @Schema(description = "收货备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜")
    @NotNull(message = "收货备注不能为空")
    private String refuseMemo;

}
